//
//  YJQSportTypeModel.h
//  GoodLuck
//
//  Created by 杨瑞 on 16/12/12.
//  Copyright © 2016年 杨瑞. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "YJQSportPolyline.h"
#import "YJQSportTrakingLineModel.h"

/// GPS 信号变化通知
extern NSString *const YJQSportGPSSignalChangedNotification;

/// 运动类型枚举
typedef enum : NSUInteger {
    YJQSportTypeWalk,
    YJQSportTypeRun,
    YJQSportTypeRide,
} YJQSportType;

/// 运动状态枚举
typedef enum : NSUInteger {
    YJQSportStatePause,
    YJQSportStateContinue,
    YJQSportStateFinish,
} YJQSportState;

/// GPS信号状态
typedef enum : NSUInteger {
    YJQSportGPSSignalStateDisconnect,
    YJQSportGPSSignalStateBad,
    YJQSportGPSSignalStateNormal,
    YJQSportGPSSignalStateGood
} YJQSportGPSSignalState;

@interface YJQSportTypeModel : NSObject

@property(nonatomic, assign, readonly) YJQSportType sportType;

@property (nonatomic, assign) YJQSportState state;
/**
 运动的起点
 */
@property (nonatomic, readonly) CLLocation *sportStartLocation;

@property (nonatomic, strong, readonly) UIImage *image;

- (instancetype)initWithSportType:(YJQSportType)sportType state:(YJQSportState)state;

- (YJQSportPolyline *)appendLocation:(CLLocation *)location;
/**
 平均速度
 */
@property(nonatomic, readonly) double avgSpeed;
/**
 最大速度
 */
@property(nonatomic, readonly) double maxSpeed;
/**
 总时间
 */
@property(nonatomic, readonly) double totleTime;
/**
 总时长
 */
@property(nonatomic,copy) NSString *totalTimes;
/**
 总距离
 */
@property(nonatomic, readonly) double totleDistance;

@end
